#include<unistd.h>
#include<stdio.h>
int gav=0;
int main()
{
  printf("进程在运行%d, %d,%d,%p\n",getpid(),getppid(),gav,&gav);
  pid_t id=fork();
  if(id==0)
  { 
    while(1){
    
      printf("我是子进程,%d,%d,%d,%p\n",getpid(),getppid(),gav,&gav);
   sleep(1);
    }  
    }else
    {
      
    while(1){
    printf("我是父进程,%d,%d,%d,%p\n",getpid(),getppid(),gav,&gav);
    gav++;
    sleep(1);
    
    
    }
    }



  return 0;
}
